package com.kly.user.db.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.kly.user.db.dao.UserInterestsDao;
import com.kly.user.db.entity.UserInterestsEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* User: yujianfu
* Date: 2023-05-22
* Time: 10:46:07.412
*/

@Repository
public class UserInterestsDaoImpl extends AbstractBaseMapper<UserInterestsEntity> implements UserInterestsDao {

    @Override
    public void deleteByUserCode(String userCode){
        getSqlSession().delete( this.getStatement("deleteByUserCode"),userCode);
    }

    @Override
    public int batchInsert(List<UserInterestsEntity> list) {
        return getSqlSession().insert(this.getStatement("batchInsert"), list);
    }

    /**
     * @return
     */
    @Override
    public List<UserInterestsEntity> queryUsers(String userCode) {
        return this.getSqlSession().selectList(this.getStatement("queryUsers"), userCode);
    }

    @Override
    public List<UserInterestsEntity> queryInterestsByUserCode(List<String> list) {
        return this.getSqlSession().selectList(this.getStatement("queryInterestsByUserCode"), list);
    }
}